<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>后台管理-<?php e(Option::get('BLOG_TITLE')); ?></title>
    <link rel="stylesheet" href="<?php assets_url('libs/bootstrap/css/bootstrap.min.css') ?>">
    <link rel="stylesheet" href="<?php assets_url('libs/bootstrap/css/bootstrap-theme.min.css') ?>">
    <link rel="stylesheet" href="<?php assets_url('libs/dashboard.css') ?>">
    <link rel="stylesheet" href="<?php assets_url('admin.css') ?>">

    <script src="<?php assets_url('libs/jquery.min.js'); ?>"></script>
    <script src="<?php assets_url('libs/bootstrap/js/bootstrap.min.js') ?>"></script>
    <script>
        var Snail = window.Snail || {};
        Snail._message = <?php echo json_encode(get_message()); ?>;
        Snail._csrfToken = '<?php echo csrf_token_get(); ?>';
    </script>
    <script src="<?php assets_url('admin.js'); ?>"></script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="./">后台管理-<?php echo Option::get('BLOG_TITLE'); ?></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <?php
                $navs = admin_layout_navs();
                foreach ($navs as $nav) {
                    if ($nav->show) {
                        $nav->render();
                    }
                }
                ?>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a class="cmd-post" href="logout.php">退出登录（<?php e(get_current_login_user_info('username')); ?>）</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <ul class="nav nav-sidebar">
                <?php
                $subNavs = array();
                foreach ($navs as $nav) {
                    if ($nav->isActive) {
                        $subNavs = $nav->subNavs;
                        break;
                    }
                }
                foreach ($subNavs as $nav) {
                    $nav->render();
                }
                ?>
            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <?php echo $__content; ?>
        </div>
    </div>
</div>
</body>
</html>